﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BookClubIt.DTO;
using BookClubIt.Data;

namespace BookClubIt.Processor
{
    public class MemberProcessor
    {
        MemberData memberDataInstance;
        public MemberData MemberDataInstance
        {
            get
            {
                if (memberDataInstance == null) memberDataInstance = new MemberData();
                return memberDataInstance;
            }
        }

        public Member SaveMember(Member member)
        {
            return MemberDataInstance.SaveMember(member);
        }
       
        public Member GetMemberById(int uid)
        {
            return MemberDataInstance.GetMemberById(uid);
        }
        public Member GetBookClubAdminById(int cid)
        {
            return MemberDataInstance.GetBookClubAdminById(cid);
        }

        public Members GetBookClubMembersById(int id)
        {
            return MemberDataInstance.GetBookClubMembersById(id);
        }
        public Members GetTopBookClubMembersById(int cid)
        {
            return MemberDataInstance.GetTopBookClubMembersById(cid);
        }
        public Members GetPendingBookClubMembersById(int id)
        {
            return MemberDataInstance.GetPendingBookClubMembersById(id);
        }
        public Members GetBookClubLeadersById(int id)
        {
            return MemberDataInstance.GetBookClubLeadersById(id);
        }
        public Member GetMemberByUsername(string username)
        {
            return MemberDataInstance.GetMemberByUsername(username);
        }
        public Member UpdateMemberAvatar(int id, string filename)
        {
            return MemberDataInstance.UpdateMemberAvatar(id,filename);
        }
        public Club_Messages GetMemberMessages(int uid)
        {
            return MemberDataInstance.GetMemberMessages(uid);
        }
        public void UpdateMemberNotification(int uid, int notifid)
        {
           MemberDataInstance.UpdateMemberNotification(uid, notifid);
        }
    }
}
